<!DOCTYPE HTML>
<html>
	<head>
		<title>代理池/影评分析系统</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
		<link rel="stylesheet" href="{{ url_for('static',filename='assets/css/main.css') }}" />
		<link rel="stylesheet" href="{{ url_for('static',filename='assets/css/style.css') }}" />
		<link rel="stylesheet" href="{{ url_for('static',filename='assets/css/prism.css') }}" />
		<style>
		#make_sentiments_line {
			max-width: 100%;
			height: auto;
		}
		</style>
	</head>
	<body class="is-preload left-sidebar">
		<div id="page-wrapper">

			<!-- Header -->
				<div id="header-wrapper">
					<header id="header" class="container">

						<!-- Logo -->
							<div id="logo">
								<h1><a href=".">影评系统</a></h1>
								<span>by 何康健</span>
							</div>

						<!-- Nav -->
							<nav id="nav">
								<ul>
									<li><a href=".">Welcome</a></li>
									<li class="current"><a href="/proxypool">代理池</a></li>
									<li><a href="/wordcloud">数据分析</a></li>
									<li><a href="/analysis">情感分析</a></li>
								</ul>
							</nav>

					</header>
				</div>

			<!-- Main -->
				<div id="main-wrapper">
					<div class="container">
						<div class="row gtr-200">
							<div class="col-4 col-12-medium">
								<div id="sidebar">

									<!-- Sidebar -->
										<section>
											<h3>项目介绍</h3>
											<p>
												代理池模块维护着从互联网抓取到的免费代理信息，并且有一套可靠度算法使得代理池中的代理信息保持较高的可用性，
                                                从而确保爬虫快速稳定运行。代理的存储后端使用Redis数据库，在运行本项目前请确保系统已安装Redis软件。
                                                本代理池还提供了RESTful API风格的API，详细使用操作使用说明。
											</p>
										</section>

										<section>
											<h3>相关链接</h3>
											<ul class="style2">
												<li><a href="http://www.66ip.cn">http://www.66ip.cn</a></li>
												<li><a href="http://ip3366.net">http://ip3366.net</a></li>
												<li><a href="http://www.iphai.com">http://www.iphai.com</a></li>
												<li><a href="https://www.kuaidaili.com">https://www.kuaidaili.com</a></li>
											</ul>
										</section>

								</div>
							</div>
							<div class="col-8 col-12-medium imp-medium">
								<div id="content">

									<!-- Content -->
										<article>

											<h2>API使用说明</h2>
                                            <table id="newspaper-b" >
                                                <thead>
                                                    <tr>
                                                        <th>API</th>
                                                        <th>说明</th>
                                                    </tr>
                                                </thead>
                                                    <tfoot>
                                                    <tr>
                                                        <td colspan="5"><em>！！！请确保正确调用</em></td>
                                                    </tr>
                                                </tfoot>
                                                <tbody>
                                                    <tr>
                                                        <td>http://127.0.0.1:5000/random</td>
                                                        <td>获取代理地址</td>
                                                    </tr>
                                                    <tr>
                                                        <td>http://127.0.0.1:5000/count</td>
                                                        <td>获取代理池地址总数</td>
                                                    </tr>
                                                </tbody>
                                            </table>
											
											<hr>

											<h2>Requests使用本代理实例</h2>
											<pre><code class="language-python">
# 导入requests库
import requests
# 定义获取代理URL
proxypool_url = 'http://127.0.0.1:5000/random'
target_url = 'http://httpbin.org/get'
# 获取代理
proxy = requests.get(proxypool_url).text.strip()
# 构造代理字典并使用代理访问
proxies = {'http': 'http://' + proxy}
response = requests.get(target_url, proxies=proxies).text
print(response)
                                            </code></pre>
											<hr>

											<h2>Quick Start</h2>
                                            <table id="newspaper-b" >
                                                <thead>
                                                    <tr>
                                                        <th>代理地址</th>
                                                    </tr>
                                                </thead>
                                                    <tfoot>
                                                    <tr>
                                                        <td colspan="5"><em>！！！请勿滥用</em></td>
                                                    </tr>
                                                </tfoot>
                                                <tbody>
											    {% for proxy in proxy_all %}
                                                    <tr>
                                                    <td>{{ proxy }}</td>
                                                    <tr>
                                                {% endfor %}
                                                </tbody>
                                            </table>

										</article>

								</div>
							</div>
						</div>
					</div>
				</div>

			<!-- Footer -->
				<div id="footer-wrapper">
					<footer id="footer" class="container">
						<div class="row">
							<div class="col-12">
								<div id="copyright">
									<ul class="menu">
										<li>&copy; 何康健. All rights reserved</li>
									</ul>
								</div>
							</div>
						</div>
					</footer>
				</div>

			</div>

		<!-- Scripts -->

			<script src="{{ url_for('static',filename='assets/js/jquery.min.js') }}"></script>
			<script src="{{ url_for('static',filename='assets/js/jquery.dropotron.min.js') }}"></script>
			<script src="{{ url_for('static',filename='assets/js/browser.min.js') }}"></script>
			<script src="{{ url_for('static',filename='assets/js/breakpoints.min.js') }}"></script>
			<script src="{{ url_for('static',filename='assets/js/util.js') }}"></script>
			<script src="{{ url_for('static',filename='assets/js/main.js') }}"></script>
			<script src="{{ url_for('static',filename='assets/js/prism.js') }}"></script>


	</body>
</html>